#pragma once
#include "ConnSet.h"
#include "plik.h"
#include "RecvData.h"


// CSendingThread

class CSendingThread : public CWinThread
{
	DECLARE_DYNCREATE(CSendingThread)

public:
	CSendingThread();           // protected constructor used by dynamic creation
	virtual ~CSendingThread();

public:
	virtual BOOL InitInstance();
	virtual int ExitInstance();
	void SetSettings(CConnSet &csSet);

protected:
	DECLARE_MESSAGE_MAP()
private:
	CSocket m_sListener;
	CSocket m_sConnection;
	CConnSet m_csSettings;
public:
	HWND m_hwnd;
	virtual int Run();
	CPlik m_Plik;
	CString m_strDestFolder;
private:
	BYTE* byBuffer;

public:
	CFile* pFile;
	CRecvData* m_pRecvData;
	CProgressCtrl* m_pProgressOne;
	CProgressCtrl* m_pProgressAll;
	CStatic* m_pTextOne;
	CStatic* m_pTextAll;
private:
	void ShowProgress(CFileStatus &fsStatus, DWORD &dwBytesThisTime, DWORD &dwAllBytes);
};


